﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Model_save.aspx.cs" Inherits="TRPOP.CMS.Web.Admin.Model_save" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>模型管理-<%=base.m_strBaseAdminPageName%></title>
    <script src="../../js/utils.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <table id="page_navigator">
        <tr>
            <td class="align_l">
                当前位置：系统管理 -> 内容模型管理 -> 编辑字段集
            </td>
        </tr>
    </table>
    <table class="table_list">
        <tr class="tr_listitem">
            <td>
                内容模型名称
            </td>
            <td colspan="12">
                <cms:TextBox ID="txtModelName" ControlValueType="String" runat="server"></cms:TextBox>
            </td>
        </tr>
        <tr class="tr_title">
            <th>
                标识
            </th>
            <th>
                字段名
            </th>
            <th>
                类型
            </th>
            <th>
                标题字段
            </th>
            <th>
                主内容字段
            </th>
            <th>
                列表显示
            </th>
            <th>
                后台搜索
            </th>
            <th>
                编辑
            </th>
            <th class=" hide">
                投稿
            </th>
            <th class="hide">
                采集
            </th>
            <th colspan="3">
                执行操作
            </th>
        </tr>
        <cms:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_ItemDataBound"
            OnItemCommand="rptList_ItemCommand">
            <ItemTemplate>
                <tr class="tr_listitem" onmouseout="this.className='tr_mouseout'" onmouseover="this.className='tr_mouseover'">
                    <td>
                        <%# Eval("Name")%>
                    </td>
                    <td>
                        <%# Eval("FieldName")%>
                    </td>
                    <td class="align_c">
                        <%#Eval("FieldTypeStr")%>
                        <%# TRPOP.CMS.Model.TableFieldInfo.GetLengthLimit(Eval("FieldTypeStr").ToString(), int.Parse(Eval("FieldLength").ToString()))%>
                    </td>
                    <td class="align_c">
                        <cms:Literal ID="ltTitle" runat="server" Visible="false"> <font size="1" color="#009900">√</font> </cms:Literal>
                        <cms:LinkButton ForeColor="#FF0000" ID="LbtTitle" runat="server" Text="×" CommandName="Title"
                            CommandArgument='<%#Eval("ModelFieldId") %>'></cms:LinkButton>
                    </td>
                    <td class="align_c">
                        <cms:Literal ID="ltMainField" runat="server" Visible="false"> <font size="1" color="#009900">√</font> </cms:Literal>
                        <cms:LinkButton ForeColor="#FF0000" ID="LbtMainField" runat="server" Text="×" CommandName="Field"
                            CommandArgument='<%#Eval("ModelFieldId") %>'></cms:LinkButton>
                    </td>
                    <td width="60" class="align_c">
                        <cms:CheckBox runat="server" ID="chkFieldListDisplay" AutoPostBack="true" CommandName="FieldListDisplay"
                            CommandArgument='<%#Eval("ModelFieldId") %>' />
                    </td>
                    <td class="align_c">
                        <cms:CheckBox runat="server" ID="chkIsSearch" AutoPostBack="true" CommandName="IsSearch"
                            Enabled="false" CommandArgument='<%#Eval("ModelFieldId") %>' />
                    </td>
                    <td class="align_c">
                        <cms:CheckBox runat="server" ID="chkIsEdit" AutoPostBack="true" CommandName="IsEdit"
                            CommandArgument='<%#Eval("ModelFieldId") %>' />
                    </td>
                    <td class="align_c hide">
                        <cms:CheckBox runat="server" ID="chkIsContribute" AutoPostBack="true" CommandName="IsContribute"
                            CommandArgument='<%#Eval("ModelFieldId") %>' />
                    </td>
                    <td class="align_c hide">
                        <cms:CheckBox runat="server" ID="chkIsCollect" AutoPostBack="true" CommandName="IsCollect"
                            CommandArgument='<%#Eval("ModelFieldId") %>' />
                    </td>
                    <td class="align_c">
                        <a href="Model_field.aspx?id=<%#Eval("ModelFieldId")%>&cid=<%=m_id%>">编辑</a>
                    </td>
                    <td class="align_c">
                        <cms:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClick="lbtnDelete_Click"
                            CommandArgument='<%#Eval("ModelFieldId") %>' OnClientClick="return confirm('你确定要删除字段吗？');"></cms:LinkButton>
                    </td>
                    </td>
                </tr>
            </ItemTemplate>
        </cms:Repeater>
        <tr class="tr_btn">
            <td>
                <cms:Button CssClass="button_style" ID="btnSubmit" Text="修改" runat="server" OnClick="btnSubmit_Click" />
                <input class="button_style" name="reset" onclick="window.location.href='Model_list.aspx'"
                    value="返回" type="reset">
            </td>
            <td class="align_r" colspan="12">
                <input name="AddNew" class="button_style" id="AddNew" onclick="window.location.href='Model_field.aspx?cid=<%=m_id%>'"
                    value="新增字段" type="button">
                <input name="fieldSort" class="button_style" id="fieldSort" onclick="show_dialog('Model_field_sort.aspx?cid=<%=m_id%>',400,390);"
                    value="字段排序" type="button">
            </td>
        </tr>
    </table>
    </form>
    <div class="button_box">
        &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
    </div>
    </form>
</body>
</html>
